﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HidesaburoDotNET.Core.Detecctors
{
    public class SukantsuDetector : YakuDetector
    {
        public override Yaku CheckYaku(AgariTehai agariTehai)
        {
            int kanCount = 0;

            foreach (Mentsu m in agariTehai.Mentsu)
            {
                if (m.Type == MentsuType.Ankan || m.Type == MentsuType.Minkan)
                {
                    kanCount++;
                }
            }

            if (kanCount == 4)
            {
                return new Yaku(13, "スーカンツ");
            }
            else
            {
                return new Yaku();
            }
        }
    }
}
